<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/head::common_head('首页')"></head>
<link rel="stylesheet" href="http://cdn.staticfile.org/codemirror/5.40.2/codemirror.min.css">
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/codemirror.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/mode/htmlmixed/htmlmixed.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/mode/css/css.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/mode/javascript/javascript.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/mode/xml/xml.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/addon/edit/closetag.min.js"></script>
<script type="text/javascript" src="http://cdn.staticfile.org/codemirror/5.40.2/addon/edit/closebrackets.min.js"></script>
<style>
.container {
	width: 1800px;
	padding-right: 5px;
	padding-left: 5px;
	margin-right: auto;
	margin-left: auto
}
.CodeMirror pre {
	/* Reset some styles that the rest of the page might have set */
	-moz-border-radius: 0;
	-webkit-border-radius: 0;
	border-radius: 0;
	border-width: 0;
	background: transparent;
	font-family: inherit;
	font-size: inherit;
	margin: 0;
	max-width: 680px;
/*	white-space: pre;white-space: pre-wrap;CodeMirror cm-s-default */
	line-height: inherit;
	color: inherit;
	z-index: 2;
	position: relative;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
	-webkit-font-variant-ligatures: contextual;
	font-variant-ligatures: contextual;
}

#iframeResult {
	display: block;
	overflow: hidden;
	border: 0 !important;
	min-width: 100px;
	width: 100%;
	min-height: 300px;
	background-color: #fff
}

@media screen and (max-width:768px) {
	.CodeMirror {
		font-family: Menlo, Monaco, Consolas, "Andale Mono", "lucida console",
			"Courier New", monospace;
	}
	#iframeResult {
		height: 300px
	}
	.form-inline {
		padding: 6px 0 2px 0
	}
}
</style>
<body>
	<div class="main-content">
		<table class="table table-bordered table-hover no-margins">
			<tbody>
				<tr>
					<td class="gray-bg" colspan="8">模板信息</td>
				</tr>
				<tr>
					<td class="gray-bg text-right" width="8%">模板名称</td>
					<td width="17%" th:text="${entity.tempName}"></td>
					<td class="gray-bg text-right" width="8%">模板编码</td>
					<td width="17%" th:text="${entity.tempCode}"></td>
					<td class="gray-bg text-right" width="8%">模板类型</td>
					<td width="17%" th:text="${entity.tempType}"></td>
					<td class="gray-bg text-right" width="8%">模板状态</td>
					<td width="17%" th:text="${entity.tempStatus}"></td>
				</tr>
				<tr>
					<td class="gray-bg text-right">模板版本：</td>
					<td th:text="${entity.tempVersion}"></td>
					<td class="gray-bg text-right">创建时间：</td>
					<td th:text="${#dates.format(entity.createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
					<td class="gray-bg text-right">发布人：</td>
					<td th:text="${entity.updateUser}"></td>
					<td class="gray-bg text-right">发布时间：</td>
					<td th:text="${#dates.format(entity.updateTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
				</tr>
			</tbody>
			<tbody th:if="${entity.paramList}!=null and ${#lists.size(entity.paramList)}>0">
				<tr>
					<td class="gray-bg" colspan="8">绑定参数</td>
				</tr>
				<tr>
					<th class="gray-bg">参数编码</th>
					<th class="gray-bg">参数名称</th>
					<th class="gray-bg">参数版本</th>
					<th class="gray-bg">请求系统</th>
					<th class="gray-bg" colspan="2">请求入参</th>
					<th class="gray-bg" colspan="2">请求地址</th>
				</tr>
				<tr th:each="option : ${entity.paramList}">
					<td th:text="${option.paramCode}"></td>
					<td th:text="${option.paramName}"></td>
					<td th:text="${option.paramVersion}"></td>
					<td th:text="${option.httpSysName}"></td>
					<td th:text="${option.httpParam}" colspan="2"></td>
					<td th:text="${option.httpUrl}" colspan="2"></td>
				</tr>
			</tbody>
				<tr>
					<td colspan="8">
						<div class="container">
							<div class="row">
								<div class="col-sm-6">
									<div class="panel panel-default">
										<div class="panel-body">
											<textarea class="form-control" id="htmlText" wrap="hard"
												name="htmlText" th:text="${entity.htmlText}"></textarea>
										</div>
									</div>
								</div>
								<div class="col-sm-6">
									<div class="panel panel-default">
										<div class="panel-body">
											<div id="iframewrapper"></div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</td>
				</tr>
		</table>
		<br>
		<div class="row">
			<div class="col-sm-offset-5 col-sm-8 text-center">
				<button type="button" id="closeBtn" class="btn btn-sm btn-info">
					<i class="fa fa-close"> </i>关 闭
				</button>
			</div>
		</div>
	</div>
	<div th:include="common/script::common_script"></div>
	<div th:include="common/validate::validate_script"></div>
	<div th:include="common/codemirror::codemirror_script"></div>
	<script type="text/javascript" th:src="@{/static/js/module/template/html/edit.js}"></script>
</body>
</html>
